package com.study.pre.thread;

public class Product extends Thread{

    private BaoZi baoZi;

    public void setBaoZi(BaoZi baoZi) {
        this.baoZi = baoZi;
    }

    @Override
    public void run() {

        while(true){

            synchronized (baoZi){

                if(baoZi.getStatus()){


                    //
                }else{

                    //
                }
            }
        }


    }
}
